home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 28
/
Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso
/
Aminet
/
docs
/
lists
/
DevGuide.lha
/
DevGuide
/
MyCheck.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-10-15
|
2KB
|
63 lines
/*************************************************
* myCheck.rexx to split $Check1 and $Check2 *
* V1.0 © Heiko Schröder 10/98 *
*************************************************
* *
* 1.0 - erstes Release, um auch Versions mit- *
* einander vergleichen zu können *
*************************************************/
Parse ARG check1","check2
check2=Delstr(check2,1,1)
address command '"SetEnv" Check2='check2
pos1 =lastpos(" ",check1)
check1=Delstr(check1,1,pos1)
address command '"SetEnv" Version='check1
punkt1=lastpos(".",check1)
If punkt1~=0 then check1=Delstr(check1,punkt1,1)
len1=Length(check1)
pos2 =lastpos(" ",check2)
check2=Delstr(check2,1,pos2)
punkt2=lastpos(".",check2)
If punkt2~=0 then check2=Delstr(check2,punkt2,1)
len2=Length(check2)
/* Kontrolle wenn unterschiedlich lange Ganzzahlen */
Select
When punkt1>punkt2 then do
address command '"SetEnv" Checkdev1='1
address command '"SetEnv" Checkdev2='0
Exit
End
When punkt1<punkt2 then do
address command '"SetEnv" Checkdev1='0
address command '"SetEnv" Checkdev2='1
Exit
End
Otherwise NOP
END
/* check2 ist ein paar Stellen zu kurz */
If len1>len2 then check2=Insert("0",check2,len2,len1-len2,"0")
Select
/* System ist neuer */
When check1>check2 then do
address command '"SetEnv" Checkdev1='1
address command '"SetEnv" Checkdev2='0
End
/* guide ist neuer */
When check1<check2 then do
address command '"SetEnv" Checkdev1='0
address command '"SetEnv" Checkdev2='1
End
/* gleich */
Otherwise do
address command '"SetEnv" Checkdev1='1
address command '"SetEnv" Checkdev2='1
End
End
Exit